package cn.buddha.jesa.conditional.base;

import cn.buddha.jesa.conditional.base.config.ConditionalBaseConf;
import cn.buddha.jesa.conditional.base.model.ConditionModel;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.Map;

/**
 * @ClassName ConditionTest
 * @Description 测试
 * @Version 1.0
 */
//@RunWith(SpringRunner.class)
//@SpringBootTest(classes = HaoAcServiceApplication.class)
public class TestConditional {

    static AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ConditionalBaseConf.class);

    public static void main(String[] args) {
        test1();
    }

    private static void test1() {
        System.err.println("Current OS is: " + applicationContext.getEnvironment().getProperty("os.name"));
        Map<String, ConditionModel> map = applicationContext.getBeansOfType(ConditionModel.class);
        System.err.println(map);
    }

}
